Skip to content

Conversation

zorkow
Copy link
Member

@zorkow zorkow commented Sep 10, 2025

The PR ensures that all formula elements that are spoken are highlighted. This is necessary when parts of the formula are not in the same DOM subtree that is rooted by the node that contains the speech.

The idea is to compute the set difference between the nodes in the subtree and the id numbers given in the semantic structure of the elements. For this we add a subtrees map that is initially populated with the information from data-semantic-structure.

Currently nodes are highlighted separately. What is still missing is a combined highlighting as discussed last week. I tried a couple of ideas, but none looked good in particular if there are also linebreaks in the expression.

@zorkow zorkow requested a review from dpvc September 10, 2025 09:24
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.72%. Comparing base (afaf1ea) to head (0ab25f7).

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #1349     +/-   ##
==========================================
  Coverage    86.72%   86.72%             
==========================================
  Files          337      337             
  Lines        84145    84145             
  Branches      3140     4769   +1629     
==========================================
  Hits         72971    72971             
+ Misses       11174    11151     -23     
- Partials         0       23     +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dpvc
Copy link
Member

dpvc commented Sep 10, 2025

Can you provide one of the examples that you have where the additional highlighting is necessary? I don't remember the format we looked at together last week.

@zorkow
Copy link
Member Author

zorkow commented Sep 10, 2025

The problem came out of the MJ issue 3419. Examples are there too. E.g.,

 \int _{C} {\mathbb{P}f}\mathcal{M} 

@dpvc
Copy link
Member

dpvc commented Sep 10, 2025

I'm getting errors from SRE. Do I need an updated copy? If so, can you say what branch I should use?

@dpvc dpvc added this to the v4.0.1 milestone Sep 10, 2025
Copy link
Member

@dpvc dpvc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are some issues to consider, here, before proceeding with this. See my comments below.

@zorkow
Copy link
Member Author

zorkow commented Oct 5, 2025

I incorporated your comments. PTAL.

@zorkow zorkow requested a review from dpvc October 5, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants